#!/bin/bash
# Author: Redbrother
# Email: 728083668@qq.com
# WebSite: https://help.ubuntu.com/community/LiveCDCustomizationFromScratch
# license: None

  if [ ! -d "squashfs-root/usr" ]; then
    echo -e "Ubuntu livecd system is not exist"
  	exit 0
  	else
  	echo -e "ubuntu live base system is Successful,you can diy it in squashfs-root contents "
  fi
  source mountx.sh
  chroot squashfs-root apt update
  chroot squashfs-root upgrade
  source umountx.sh
  cd squashfs-root
  cd usr/share/applications
sed -i 's/GenericName\[zh_CN\]/Name\[zh_CN\]/' engrampa.desktop
sed -i 's/GenericName\[zh_CN\]/Name\[zh_CN\]/' mate-terminal.desktop
sed -i 's/GenericName\[zh_CN\]/Name\[zh_CN\]/' caja-browser.desktop
sed -i 's/Exec=fcitx/Exec=im-config/' fcitx.desktop
sed -i 's/Settings/System/' fcitx-con*.desktop
sed -i 's/NoDisplay\=true//' python*.desktop
sed -i 's/System\;//'  mate-terminal.desktop
sed -i 's/System\;//'  caja-browser.desktop
sed -i 's/MATE\ 之眼//' eom.desktop
  cd ../../../
  cd ../
  echo -e "ubuntu live base system update successfully "
  echo -e "you can run ' sudo bash mkiso.sh ' to build an iso LiveCD "
